<?php
	require_once( '../_config/base.inc.php' );

	use \dayscript\Application;
	use \dayscript\util\Debug;
	use \dayscript\util\Benchmark;
	use \dayscript\ErrorManager;
	use \dayscript\Enviroment;
	
	Application::getInstance( BASE_DIR . '_config/tests.inc.php' );
	ErrorManager::setUproarMode( true );
	
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
	<title>Enviroment</title>
	<link rel="stylesheet" type="text/css" media="all" href="../_resources/styles.css" />
</head>
<body>
<pre>
<b>Enviroment:</b>
<?php
	$env = Enviroment::getInstance( );
	$keys = $env->keys( );
	
	var_dump( Enviroment::get( ) );
	var_dump( Enviroment::get( 'trest' ) );
	var_dump( Enviroment::get( 'trest2', 'Nel2' ) );
	echo Benchmark::getInstance( );
	var_dump( Enviroment::get( 'scrip', 'NOASSIGN' ) );
	echo Benchmark::getInstance( );
	var_dump( Enviroment::get( 'scrip', 'NOASSIGN', true ) );
	echo Benchmark::getInstance( );
	
	foreach( $keys as $key )
		echo "\n<b>Llave: '" . $key . "'</b>: " . Debug::dumpVar( call_user_func( array( $env, $key ) ), true );
		
?>
<b>Benchmark:</b><?php echo Benchmark::getInstance( ) ?>
</pre>
</body>
</html>